<template>
<h1>userList</h1>
</template>

<script>
  export default {
    name: "userList",
    methods:{

    // 防抖函数
      debounce(func,delay){
        let timer = null
        return function (...args) {
          if(timer) clearTimeout(timer)
          timer = setTimeout(()=>{
            func.apply(this,args)
          },delay)
        }
      },
      // 判空，是空返回true
      isNull(str){
        if (str === '') return true;
        if (str === null) return true;
        const regu = '^[ ]+$';
        const re = new RegExp(regu);
        return re.test(str)
      },
      // 2019-11-22T15:48:09.124 转 2019-11-22 15:48:09
      transformDateFormat(dateStr){
        return dateStr.split("T").join(" ").split(".")[0]
      }

    }
  }
</script>

<style scoped>

</style>
